Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dgram: reuseAddr/reusePort fixes #16677

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

dgram: reuseAddr/reusePort fixes #16677

wants to merge 8 commits into from

Conversation

heimskr
Copy link
Member

@heimskr heimskr commented Jan 23, 2025

What does this PR do?

Adds support for the reuseAddr option in node:dgram, and fixes the behavior of reusePort to match the behavior in Node.js.

  • Documentation or TypeScript types
  • Code changes

How did you verify your code works?

I ran the code in #16133.

@robobun
Copy link

robobun commented Jan 23, 2025

Updated 9:49 PM PT - Jan 23rd, 2025

@heimskr, your commit 81e8362 has 3 failures in #10433:


🧪   try this PR locally:

bunx bun-pr 16677

@heimskr heimskr requested review from a team and Jarred-Sumner and removed request for a team January 23, 2025 23:15
packages/bun-usockets/src/bsd.c Outdated Show resolved Hide resolved
packages/bun-usockets/src/bsd.c Outdated Show resolved Hide resolved
src/bun.js/api/server.zig Show resolved Hide resolved
@@ -1279,6 +1289,11 @@ pub const ServerConfig = struct {
}
if (global.hasException()) return error.JSError;

if (try arg.get(global, "ipv6Only")) |dev| {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a getOptionalBoolean function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants